import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import My from '@/components/My'
import FriendsCricle from '@/components/FriendsCricle'
import VIP from '@/components/VIP'
import ShoppingCart from '@/components/ShoppingCart'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      // 根路径自动转到'/Home/0'
      redirect: '/Home/0'
    },
    {
      path: '/Home/:id',
      component: Home
    },
    {
      path: '/My',
      name: 'My',
      component: My
    },
    {
      path: '/FriendsCricle',
      name: 'FriendsCricle',
      component: FriendsCricle
    },
    {
      path: '/VIP',
      name: 'VIP',
      component: VIP
    },
    {
      path: '/ShoppingCart',
      name: 'ShoppingCart',
      component: ShoppingCart
    }
  ]
})
